Current Location: Home> Function Categories> decoct

decoct

Convert decimal to octal
Name:decoct
Category:math
Programming Language:php
One-line Description:Convert decimal to octal.

Definition and usage

decoct() function converts decimal to octal.

Example

 <?php
echo decoct ( "30" ) ;
echo decoct ( "10" ) ;
echo decoct ( "1587" ) ;
echo decoct ( "70" ) ;
?>

Try it yourself

grammar

 decoct ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing an octal representation of the given dec_number parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "3777777777777".

Similar Functions
Popular Articles